Conversation
1. Jekyllビルドフック追加(_plugins/build_hooks.rb)
- jekyll buildまたはjekyll server実行時に自動的に以下を実行:
- upsert_dojos_geojson: GeoJSON生成
- compact_geojson: GeoJSON圧縮(22.9%削減)
- cache_dojo_logos: ロゴキャッシュ
- ローカル開発でも本番環境でも一貫した動作
2. GitHub Actions最適化(scheduler_daily.yml)
- 二重実行していたcompact_geojsonを削除
- Jekyllプラグインが自動実行するため不要に
- ビルド時間の短縮とコードの簡潔化
Closed
- compact_geojsonの二重実行を削除 - Jekyllプラグインが自動実行するため不要に
- データ準備ステップを`jekyll build`に置き換え - プラグインが自動的にcache_dojo_logos、upsert_dojos_geojson、compact_geojsonを実行 - _siteは.gitignoreされているため問題なし - ステップ数削減でワークフローがより理解しやすく
- ビルドを1回だけに削減(JEKYLL_ENV=production指定を前倒し) - テストをコミット前に実行(安全性向上) - ステップ名を改善: - 🔧 Build data to render DojoMap(より明確な命名) - ✅ Test(Build & Testから分離) - 二重ビルドを完全に排除
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Jekyllビルド時に自動的にデータ更新タスクを実行するプラグインを追加し、GitHub Actionsワークフローを大幅に簡潔化・最適化しました。
変更内容
1. Jekyllビルドフック追加(
_plugins/build_hooks.rb)jekyll buildまたはjekyll server実行時に自動的に以下のRakeタスクを実行:upsert_dojos_geojson: GeoJSON生成compact_geojson: GeoJSON圧縮(22.9%削減)cache_dojo_logos: Dojoロゴキャッシュメリット:
dojo2dojo.csv更新時もjekyll buildだけで自動反映2. GitHub Actions大幅最適化
scheduler_daily.ymlBefore(複数ステップで二重実行):
After(1ビルド、テスト後コミット):
効果:
deploy_to_pages.ymlcompact_geojsonの二重実行を削除テスト結果
実装の考慮点
build_hooks.rbというシンプルな名前にbundle exec rake xxx)_site/は.gitignoreされているため、jekyll buildをデータ準備に使用可能全体効果